package cn.bdqn.consumer1.feign;

import cn.bdqn.consumer1.pojo.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(value="provider",fallback = HelloFeignFallBack.class)
public interface HelloFeign {

    @GetMapping("/hello")
    String hello(@RequestParam("uname") String uname, @RequestParam("age") Integer age);

    @PostMapping("/doLogin")
    UserInfo doLogin(@RequestBody UserInfo userInfo);

    @PutMapping("updateUser")
    int updateUser(@RequestBody UserInfo userInfo);

    @PostMapping("/doLogin2")
    boolean doLogin2(@RequestBody Map map);
}
